package top.jiangqiang.qyblog.core.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;
import top.jiangqiang.qyblog.core.domain.StorageProperties;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author jiangqiang
 * @date 2022-11-29
 */
@Accessors(chain = true)
@Data
@Schema(name = "存储器新增请求参数", description = "")
public class StorageAddDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "配置名")
    private String name;
    @Schema(description = "存储器类型，例如cos，oss")
    @NotBlank(message = "存储器类型不能为空")
    private String type;

    @Schema(description = "存储器配置")
    @NotNull(message = "存储器配置不能为空")
    @Valid
    private StorageProperties config;
}
